//
//  Seciondata.m
//  lyxluyou
//
//  Created by mmyy on 15/10/15.
//  Copyright (c) 2015年 mmyy. All rights reserved.
//

#import "Seciondata.h"

@implementation Seciondata
@dynamic title;
+(void)removeAllData
{
    NSArray *array = [Seciondata MR_findAll];
    for (Seciondata *items in array) {
        [items MR_deleteEntity];
        [[NSManagedObjectContext MR_defaultContext] MR_saveToPersistentStoreAndWait];
    }
    
}
+(NSArray *)getData
{
    NSArray *array = [Seciondata MR_findAll];
    return array;
}
+(NSArray *)getDataWithTitle:(NSString *)title
{
    NSArray *array = [Seciondata MR_findAllWithPredicate:[NSPredicate predicateWithFormat:@"title like %@", title]];
    return array;
}
@end
